.PHONY:all
all:exec cmd mytest

exec:exec.c
	gcc -o $@ $^

cmd:mycmd.c
	gcc -o $@ $^

mytest:test.cc 
	g++ -o $@ $^

.PHONY:clean
clean:
	rm -f exec cmd mytest
